package com.cwl.common.api;

import com.alibaba.fastjson.JSONObject;

import java.util.Date;
import java.util.Map;

/**
 * 功能描述：
 *
 * @author cwledit
 * @date 2019/3/12
 */
public class ApiRequest extends JSONObject {

    public final static String PARAM_APPKEY = "appKey";
    public final static String PARAM_SIGN = "sign";
    public final static String PARAM_TIMESTAMP = "timestamp";
    public final static String PARAM_MCHNO = "mchNo";
    public final static String PARAM_ACCOUNTID = "accountId";

    public ApiRequest(Map<String, Object> map) {
        super(map);
    }

    public String fetchAppKey(){
        return getString(PARAM_APPKEY);
    }

    public String fetchSign(){
        return getString(PARAM_SIGN);
    }

    public Date fetchTimestamp(){
        return getDate(PARAM_TIMESTAMP);
    }

    public String fetchMchNo(){
        return getString(PARAM_MCHNO);
    }

    public String fetchAccountId(){
        return getString(PARAM_ACCOUNTID);
    }


}
